var parent = Tools.$('container')


var boxs = new Array(10)
for (let index = 0; index < boxs.length; index++) {
    var r = Tools.getRandom(0, 255)
    var g = Tools.getRandom(0, 255)
    var b = Tools.getRandom(0, 255)
    const element = new Box(parent, {backgroundColor: `rgb(${r}, ${g}, ${b})`})
    boxs[index] = element
}
randomBox()
setInterval(randomBox, 500)

function randomBox() {
    for (let i = 0; i < boxs.length; i++) {
        var box = boxs[i];
        box.random()
        
    }
}